<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>

        // Set 类似于数组的一个数据类型 
        // 自带去重功能
        var ss = new Set([12,23,34,23,1,2,12]);
        console.log(ss);
        console.log(ss.size);

        var arr = [12,23,34,23,1,2,12];
        ss = new Set(arr);
        // console.log(ss);
        var arr1 = Array.from(ss);
        console.log(arr1);


        // 类似于对象的一中数据类型
        var mm = new Map([["name","lili"],["age","18"]]);
        console.log(mm);
        mm.set("sex",true);
        // mm.set(arr,true);
        console.log(mm);
        console.log(mm.get("name"));


    </script>
</body>
</html>